<?php
namespace app\home\model;

use think\Model;

class MaterialCommentModel extends Model
{
    protected $table = 'sf_material_comment';
    protected $autoWriteTimestamp = true;
    protected $createTime = 'add_time';
    protected $updateTime = 'update_time';
    public function getCommentAttr($data){
        return explode(',',$data);
    }
    public function getUidAttr($data){
        $user = UserModel::get(['id'=>$data]);
        return $str = substr_replace($user['mobile'], '****', 3, 4);
    }
}
